document.addEventListener('alpine:init', () => {
  Alpine.data('counter', () => {
    return {
      data: 0,
      increment() {
        this.data++;
      },
      decrement() {
        this.data--;
      },
      reset() {
        this.data = 0;
      },
    };
  });
});
